
package com.jf.cloud.multishop.controller.admin;

import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.multishop.service.ShopDetailService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springdoc.api.annotations.ParameterObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zz
 * @Date 2021/8/14 16:45
 */
@RestController("adminShopDetailController")
@RequestMapping("/mp/shop_detail")
@Tag(name = "admin-店铺信息")
public class ShopDetailController {

    @Autowired
    private ShopDetailService shopDetailService;

    @GetMapping("/check_shop_name")
    @Operation(summary = "检查店铺名称是否已存在" , description = "检查店铺名称是否已存在")
    public ServerResponseEntity<Boolean> checkShopName(@ParameterObject @RequestParam(value = "shopName") String shopName) {
        Boolean res = shopDetailService.checkShopName(shopName);
        return ServerResponseEntity.success(res);
    }

}
